<template>
  <div id="app">
     <mt-header title="新闻详情">
      <router-link to="/" slot="left">
        <mt-button icon="back">返回</mt-button>
      </router-link>
      <mt-button icon="more" slot="right"></mt-button>
    </mt-header>
    <main>
      <section class="">
        <div class="detailMain">
          <h2 class="titInfoDetail">{{this.Newdetail.title}}</h2>
          <p class="attribute">
            <span>编辑：   {{this.Newdetail.createDateName}}</span>
            <!-- <span>{{this.Newdetail.createDate}}</span> -->
          </p>
          <div class="detailTxtPic">
            <p v-html="this.Newdetail.contentStr"></p>
          </div>
        </div>
      </section>
    </main>
  </div>
</template>

<script type="text/ecmascript-6">
  import axios from 'axios';
  import {
    Header
  } from 'mint-ui';
  export default {
     components: {
      "mt-header": Header,
    },
    data() {
      return {
           Newdetail:{},
      };
    },
     created() {
      this.Newdetail=JSON.parse(sessionStorage.getItem('detailitem')).content;
    },
    beforeRouteEnter(to, from, next) {
      window.document.body.style.backgroundColor = 'white';
      next();
    },
    beforeRouteLeave(to, from, next) {
      window.document.body.style.backgroundColor = '';
      next();
    },
    //方法
    methods: {
    },
     mounted() {
   
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->

<style lang="scss" scoped>
  .detailMain {
    padding: 0 .26666666666666666rem;
    background: #fff;
  }
  
  .titInfoDetail {
    font-size: 1.1rem;
    padding: .4rem 0 .26666666666666666rem;
    color: #333;
  }
  
  .attribute {
    display: -webkit-box;
    display: box;
  }
  
  .attribute span {
    display: block;
    -moz-box-flex: 1;
    -webkit-box-flex: 1;
    box-flex: 1;
    color: #999;
    line-height: .4rem;
  }
  
  .detailTxtPic {
    color: #333;
    padding: .5333333333333333rem 0 0;
    font-size: .9rem;
    p {
      margin: 0px;
      text-indent: 2rem;
      p{
        margin: 0
      }
    }
  }
</style>
